<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<form id="pagerForm" method="post" action="#rel#">
	<input type="hidden" name="pageNum" value="1" /> <input type="hidden"
		name="numPerPage" value="${model.numPerPage}" /> <input type="hidden"
		name="orderField" value="${param.orderField}" /> <input type="hidden"
		name="orderDirection" value="${param.orderDirection}" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);"
		action="${rootPath }/back/admins_adminsList.htm" method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>
						<label>关键字：</label>
						<input type="text" name="keyword" value="${requestScope.keyword }" />
						状态:
						<select name="status">
							<option value="">请选择</option>
							<option value="1" ${requestScope.status == '1' ? 'selected' : '' }>启用</option>
							<option value="0" ${requestScope.status == '0' ? 'selected' : '' }>禁用</option>
						</select>
						角色:
						<select name="roleId">
							<option value="">请选择</option>
							<c:forEach items="${requestScope.roleList }" var="role" varStatus="stat">
								<option value="${role.id }" ${role.id == requestScope.roleId ? 'selected' : '' }>${role.name }</option>
							</c:forEach>
						</select>
						时间:
						<input type="text" name="st" value="${requestScope.st }" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true"/>
						-->
						<input type="text" name="ed" value="${requestScope.ed }" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true"/>
					</td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">检索</button>
							</div>
						</div>
					</li>
					<li><a class="button" href="demo_page6.html" target="dialog"
						mask="true" title="查询框"><span>高级检索</span></a></li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="demo_page4.html" target="navTab"><span>添加</span></a></li>
			<li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="ids"
				href="demo/common/ajaxDone.html" class="delete"><span>批量删除默认方式</span></a></li>
			<li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="ids"
				postType="string" href="demo/common/ajaxDone.html" class="delete"><span>批量删除逗号分隔</span></a></li>
			<li><a class="edit" href="${rootPath }/back/admins_adminsUpdate.htm?aid={sid_user}"
				target="navTab" rel="adminsUpdate" warn="请选择一个管理员"><span>修改</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="demo/common/dwz-team.xls"
				target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="1200" layoutH="138">
		<thead>
			<tr>
				<th width="25"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="40" orderField="accountNo" class="asc">序号</th>
				<th width="20" orderField="accountName">Id</th>
				<th width="80" orderField="accountType">角色</th>
				<th width="130" orderField="accountCert">邮箱</th>
				<th width="60" align="center" orderField="accountLevel">真实姓名</th>
				<th width="70">手机</th>
				<th width="70">qq</th>
				<th width="70">状态</th>
				<th width="110">创建时间</th>
				<th width="110">更新时间</th>
				<th width="110">上次登陆时间</th>
				<th width="70">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${requestScope.adminsList }" var="admins" varStatus="stat">
				<tr target="sid_user" rel="${admins.id }">
					<td><input name="ids" value="xxx" type="checkbox"></td>
					<td>${stat.count }</td>
					<td>${admins.id }</td>
					<td>${admins.role.name }</td>
					<td>${admins.email }</td>
					<td>${admins.trueName }</td>
					<td>${admins.phone }</td>
					<td>${admins.qq }</td>
					<td>${admins.status }</td>
					<td><fmt:formatDate value="${admins.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
					<td><fmt:formatDate value="${admins.updateTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
					<td><fmt:formatDate value="${admins.lastLoginTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
					<td>
						<a title="删除" target="ajaxTodo" href="demo/common/ajaxDone.html?id=xxx" class="btnDel">删除</a>
						<a title="管理员更新" target="navTab" rel="adminsUpdate" href="${rootPath }/back/admins_adminsUpdate.htm?aid=${admins.id}" class="btnEdit">管理员更新</a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	
	<%--
		分页,点击上一页,js修改当前页的值<input>,操作分页的表单提交
	 --%>
	<form id="adminsListPageForm" action="${rootPath }/back/admins_adminsList.htm" method="post" onsubmit="return navTabSearch(this);">
		<input type="hidden" name="keyword" value="${requestScope.keyword }">
		<input type="hidden" name="status" value="${requestScope.status }">
		<input type="hidden" name="st" value="${requestScope.st }">
		<input type="hidden" name="ed" value="${requestScope.ed }">
		<input type="hidden" name="roleId" value="${requestScope.roleId }">
		
		<div class="panelBar">
			<div class="pages">
				<a href="" onclick="return pageForm('adminsListPageForm','adminsListCurrentPage','1','adminsListPageSize','${requestScope.pageInfoUtil.pageSize }')" class="button"><span>首页</span></a>
				<a href="" onclick="return pageForm('adminsListPageForm','adminsListCurrentPage','${requestScope.pageInfoUtil.prePage }','adminsListPageSize','${requestScope.pageInfoUtil.pageSize }')"class="button"><span>上一页&nbsp;</span></a>
				<a href="" onclick="return pageForm('adminsListPageForm','adminsListCurrentPage','${requestScope.pageInfoUtil.nextPage }','adminsListPageSize','${requestScope.pageInfoUtil.pageSize }')"class="button"><span>下一页&nbsp;</span></a>
				<a href="" onclick="return pageForm('adminsListPageForm','adminsListCurrentPage','${requestScope.pageInfoUtil.totalPage }','adminsListPageSize','${requestScope.pageInfoUtil.pageSize }')" class="button"><span>尾页&nbsp;</span></a>
				共${requestScope.pageInfoUtil.totalRecord }条&nbsp;共${requestScope.pageInfoUtil.totalPage }页
				第<input type="text" name="currentPage" id="adminsListCurrentPage" value="${requestScope.pageInfoUtil.currentPage }" size="5">页
				每页<input type="text" name="pageSize"  id="adminsListPageSize" value="${requestScope.pageInfoUtil.pageSize }" size="5">条
				<input type="submit" value="GO">
			</div>
		</div>
	</form>
</div>